<%@ page language="java" import="java.sql.*" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="control.*"%>
<% request.setCharacterEncoding("utf-8"); %>
<% 
String id = request.getParameter("id"); 
%>
<%
ServerIp ip = new ServerIp();
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;

try{
	Class.forName(ip.getDriver());
	conn = DriverManager.getConnection(ip.getUrl(),ip.getId(),ip.getPw());
	String sql="select mb_id from member_info where mb_id=?";
	pstmt=conn.prepareStatement(sql);
	pstmt.setString(1, id);
	rs = pstmt.executeQuery();
	if(rs.next()){
		out.println(id + " 는 사용할 수 없습니다.");
	}else{
		out.println(id + " 는 사용할 수 있습니다.");
	}
}catch(Exception e){
	e.printStackTrace();
}
conn.close();pstmt.close();rs.close();
%>
<br/><br/><center><a href="" onClick="javascript:self.close()">확인</a></center>